import Vue from 'vue'
import Vuex from 'vuex'
import user from './user'
import persistedState from 'vuex-persistedstate'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    user
  },
  plugins: [
    // 数据持久化
    persistedState({
      storage: localStorage
    })
  ]
})
